Optimal. Leaf size=191 \[ -\frac {\sqrt {2} (B c-A d) F_1\left (\frac {1}{2}+m;\frac {1}{2},1;\frac {3}{2}+m;\frac {1}{2} (1+\sin (e+f x)),-\frac {d (1+\sin (e+f x))}{c-d}\right ) \cos (e+f x) (a+a \sin (e+f x))^m}{(c-d) d f (1+2 m) \sqrt {1-\sin (e+f x)}}-\frac {2^{\frac {1}{2}+m} B \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 191, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {3065, 2731,
2730, 2867, 142, 141} \begin {gather*} -\frac {\sqrt {2} (B c-A d) \cos (e+f x) (a \sin (e+f x)+a)^m F_1\left (m+\frac {1}{2};\frac {1}{2},1;m+\frac {3}{2};\frac {1}{2} (\sin (e+f x)+1),-\frac {d (\sin (e+f x)+1)}{c-d}\right )}{d f (2 m+1) (c-d) \sqrt {1-\sin (e+f x)}}-\frac {B 2^{m+\frac {1}{2}} \cos (e+f x) (\sin (e+f x)+1)^{-m-\frac {1}{2}} (a \sin (e+f x)+a)^m \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right )}{d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 141
Rule 142
Rule 2730
Rule 2731
Rule 2867
Rule 3065
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^m (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx &=\frac {B \int (a+a \sin (e+f x))^m \, dx}{d}-\frac {(B c-A d) \int \frac {(a+a \sin (e+f x))^m}{c+d \sin (e+f x)} \, dx}{d}\\ &=-\frac {\left (a^2 (B c-A d) \cos (e+f x)\right ) \text {Subst}\left (\int \frac {(a+a x)^{-\frac {1}{2}+m}}{\sqrt {a-a x} (c+d x)} \, dx,x,\sin (e+f x)\right )}{d f \sqrt {a-a \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}+\frac {\left (B (1+\sin (e+f x))^{-m} (a+a \sin (e+f x))^m\right ) \int (1+\sin (e+f x))^m \, dx}{d}\\ &=-\frac {2^{\frac {1}{2}+m} B \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{d f}-\frac {\left (a^2 (B c-A d) \cos (e+f x) \sqrt {\frac {a-a \sin (e+f x)}{a}}\right ) \text {Subst}\left (\int \frac {(a+a x)^{-\frac {1}{2}+m}}{\sqrt {\frac {1}{2}-\frac {x}{2}} (c+d x)} \, dx,x,\sin (e+f x)\right )}{\sqrt {2} d f (a-a \sin (e+f x)) \sqrt {a+a \sin (e+f x)}}\\ &=-\frac {\sqrt {2} (B c-A d) F_1\left (\frac {1}{2}+m;\frac {1}{2},1;\frac {3}{2}+m;\frac {1}{2} (1+\sin (e+f x)),-\frac {d (1+\sin (e+f x))}{c-d}\right ) \cos (e+f x) (a+a \sin (e+f x))^m}{(c-d) d f (1+2 m) \sqrt {1-\sin (e+f x)}}-\frac {2^{\frac {1}{2}+m} B \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(473\) vs. \(2(191)=382\).
time = 5.01, size = 473, normalized size = 2.48 \begin {gather*} \frac {(a (1+\sin (e+f x)))^m \left (\frac {\sqrt {2} B \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2}+m;\frac {3}{2}+m;\frac {1}{4} \cos ^2(e+f x) \csc ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )}{(d+2 d m) \sqrt {1-\sin (e+f x)}}+\frac {6 (c+d) (B c-A d) F_1\left (\frac {1}{2};\frac {1}{2}-m,1;\frac {3}{2};\cos ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),\frac {2 d \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \cos ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )^{\frac {1}{2}+m} \cot \left (\frac {1}{4} (2 e+\pi +2 f x)\right ) \sec ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ) \sin ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right )^{\frac {1}{2}-m}}{d (c+d \sin (e+f x)) \left (3 (c+d) F_1\left (\frac {1}{2};\frac {1}{2}-m,1;\frac {3}{2};\cos ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),\frac {2 d \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )+\left (4 d F_1\left (\frac {3}{2};\frac {1}{2}-m,2;\frac {5}{2};\cos ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),\frac {2 d \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )-(c+d) (-1+2 m) F_1\left (\frac {3}{2};\frac {3}{2}-m,1;\frac {5}{2};\cos ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),\frac {2 d \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )\right ) \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )}\right )}{f} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.45, size = 0, normalized size = 0.00 \[\int \frac {\left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right )}{c +d \sin \left (f x +e \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m}{c+d\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________